﻿using System.ComponentModel.DataAnnotations;

namespace Yyyg.WebUI.Models
{
    public class AlterPwd
    {
        [Required]
        public string OldPwd { get; set; }

        [Required]
        [RegularExpression(@"^\w{6,16}$", ErrorMessage = "密码不符合规范")]
        public string NewPwd { get; set; }

        [Required]
        [Compare("NewPwd", ErrorMessage = "两次密码不一致")]
        public string ConfirmPwd { get; set; }
    }
}